package com.wzp;

import com.wzp.service.UserService;
import org.mybatis.spring.WzpImportBeanDefinitionRgistrar;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

/**
 * @author zhengpeng.wang
 */
@ComponentScan("com.wzp")
@Import(WzpImportBeanDefinitionRgistrar.class)
public class WzpMybatisSpringApplication {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(WzpMybatisSpringApplication.class);
        applicationContext.refresh();

        UserService userService = applicationContext.getBean("userService", UserService.class);
        userService.test();

    }
}
